<template>
    <page-body >
        <view class="page" >
    <view class="flex benben-position-layout flex flex-wrap align-center realname_flex_0"    :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
            <view   class='flex flex-wrap align-center justify-between flex-sub realname_fd0_0'      >
            <view   class='flex flex-wrap align-center realname_fd0_0_c0'   @tap.stop="handleJumpDiy" data-type="back" data-url="1"   >
        <text class='fu-iconfont2  realname_fd0_0_c0_c0'    >&#xE794;</text>
</view>
    <view   class='flex flex-wrap align-stretch justify-center'      >
        <text class='realname_fd0_0_c1_c0'  >完善信息</text>
</view>
    <view   class='flex flex-wrap align-center justify-end realname_fd0_0_c0'      >
        </view>
</view>

        </view>
<view :style="{height: (88+StatusBarRpx)+'rpx'}"  ></view>
<!---个人信息flex布局开始-->
 <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout realname_flex_1"    >
        <text class='realname_fd1_0'  >公司信息</text>
    <view   class='flex align-center justify-between realname_fd1_1'      >
        <text class='realname_fd1_1_c0'  >公司名称</text>
<benben-input class='realname_fd1_1_c1'   type="text" :placeholder="`请输入姓名`" confirm-type="done" :maxlength="8" placeholder-style="color:#999;font-size:32rpx"  v-model="datatInfo.name" />
</view>
    <view   class='flex align-center justify-between realname_fd1_2'   @tap.stop="pickerDiy1719309124666=true"   >
        <text class='realname_fd1_1_c0'  >所在省市区</text>
<benben-input class='realname_fd1_2_c1'   type="text" :placeholder="`请选择`" confirm-type="done" :maxlength="-1" placeholder-style="color:#999;font-size:32rpx"  v-model="datatInfo.phone" />
</view>
    <view   class='flex align-center justify-between realname_fd1_1'      >
        <text class='realname_fd1_1_c0'  >详细地址</text>
<benben-input class='realname_fd1_2_c1'   type="text" :placeholder="`请输入`" confirm-type="done" :maxlength="20" placeholder-style="color:#999;font-size:32rpx"  v-model="datatInfo.idcard_no" />
</view>
    <view   class='flex align-stretch justify-between realname_fd1_4'      >
        <text class='realname_fd1_1_c0'  >营业执照</text>
    <view   class='flex flex-direction flex-wrap align-center'      >
        <benben-image-upload :path.sync="datatInfo.idcard_emblem" :img-id.sync="national_face" :is-cropping="false" :is-show-clean="true" class="upload position-relative">
    <text v-if="datatInfo.idcard_emblem != ''" data-type="clean" class='fu-iconfont2 position-absolute realname_fd1_4_c1_c0_icon'  >&#xE8E7;</text>
     <image class=" realname_fd1_4_c1_c0_image" mode="aspectFill"  :src="datatInfo.idcard_emblem ? datatInfo.idcard_emblem : STATIC_URL+'126.png'"></image>
</benben-image-upload>
</view>
</view>
    <view   class='flex align-stretch justify-between realname_fd1_4'      >
        <text class='realname_fd1_1_c0'  >经营许可证</text>
    <view   class='flex flex-direction flex-wrap align-center'      >
        <benben-image-upload :path.sync="datatInfo.idcard_portrait" :img-id.sync="portrait_face" :is-cropping="false" :is-show-clean="true" class="upload position-relative">
    <text v-if="datatInfo.idcard_portrait != ''" data-type="clean" class='fu-iconfont2 position-absolute realname_fd1_4_c1_c0_icon'  >&#xE8E7;</text>
     <image class=" realname_fd1_4_c1_c0_image" mode="aspectFill"  :src="datatInfo.idcard_portrait ? datatInfo.idcard_portrait : STATIC_URL+'125.png'"></image>
</benben-image-upload>
</view>
</view>
    <view   class='flex flex-wrap align-center justify-center realname_fd1_6'      >
        <button class='realname_fd1_6_c0'  @tap.stop="submitFunc()"  >提交</button>
</view>
    <view   class='flex align-center justify-between realname_fd1_7'      >
        <text class='realname_fd1_1_c0'  >公司简介</text>
</view>
<view class='flex flex-wrap realname_fd1_8'>
<benben-textarea class='flex realname_input_fd1_8'  :placeholder="'请输入您的公司简介'" :adjust-position='true' :maxlength="240" :show-num='true' placeholder-style="color:#999;font-size:28rpx"   v-model="fd1_8" />
<template>    <view   class='flex flex justify-end realname_numberfd1_8_c0'      >
        <text   >{{fd1_8.length}}</text>
<text   >/</text>
<text   >240</text>
</view>
</template>
</view>
</view>
        
<!---个人信息flex布局结束-->
<!--选择器开始 -->
        <benben-picker ref="benbenWritePickerCodepicker2" :visible.sync="pickerDiy1719309124666" :label.sync='addressAll' :province.sync='provice' :city.sync='city' :area.sync='area'  mode='region' :mask-show='true' :picker-height='88' :hide-area='true'  >
            <template #picker-header>
        <view   class='flex flex-wrap align-center justify-between realname_picker2_0'      >
        <text   @tap="$refs.benbenWritePickerCodepicker2.cancel()" >取消</text>
<text   >标题</text>
<text class='realname_picker2_0_c2'  @tap="$refs.benbenWritePickerCodepicker2.pickerConfirm()" >确认</text>
</view>
</template>
        </benben-picker>
<!--选择器结束 -->
    <view class="flex flex-wrap align-stretch justify-center benben-position-layout flex realname_flex_3"    :style="{height:(140+bottomSafeAreaRpx)+'rpx',paddingBottom:bottomSafeAreaRpx+'rpx', }">
        <button class='realname_fd3_0'  @tap.stop="submitFunc()"  >提交</button>

        </view>
<view :style="{height: (140+bottomSafeAreaRpx)+'rpx'}"  ></view>
    
    
        </view>
    </page-body>
</template>
<script>
    import {validate} from '@/common/utils/validate.js'
    
    export default {
        components:{},
        
        
        data(){
			return {"pickerDiy1719309124666":false,"fd1_8":"","datatInfo":{"aid":"","idcard_no":"","name":"","idcard_emblem":"","idcard_portrait":"","idcard_time":"","reason":"","status":"","phone":""},"national_face":"","portrait_face":"","city":"","provice":"","area":"","addressAll":""};
		},
		computed:{
            
		},
		watch:{},
		onLoad(options){
            
		},
        onUnload() {
                
        },
		onReady(){
            
		},
		onShow(){
            
		},
		onHide(){
            
		},
		onResize(){
            
		},
		onPullDownRefresh(){
            
		},
		onReachBottom(e){
            
		},
		onPageScroll(e){
            
		},
		methods:{
                            //提交
                async submitFunc(){
                                if(!validate(this.datatInfo.name,'require')){
                 this.$message.info('请输入联系人姓名');
                 return false;
            }
            if(!validate(this.datatInfo.phone,'require')){
                 this.$message.info('请输入联系人手机号');
                 return false;
            }
            if(!validate(this.datatInfo.phone,'phone')){
                 this.$message.info('手机号格式不正确');
                 return false;
            }
            if(!validate(this.datatInfo.idcard_no,'require')){
                 this.$message.info('请输入联系人身份证');
                 return false;
            }
            if(!validate(this.datatInfo.idcard_emblem,'require')){
                 this.$message.info('请上传身份证国徽面');
                 return false;
            }
            if(!validate(this.datatInfo.idcard_portrait,'require')){
                 this.$message.info('请上传身份证人像面');
                 return false;
            }
    //请求方法
    //数据验证
    
  let data637c7d436e440 = await this.$api.post(global.apiUrls.post637c7d436e440, {
    phone:this.datatInfo.phone,name:this.datatInfo.name,idcard_no:this.datatInfo.idcard_no,idcard_emblem:this.national_face,idcard_portrait:this.portrait_face,idcard_time:this.datatInfo.idcard_time
  });
  
  if (data637c7d436e440.data.code != 1) {
    this.$message.info(data637c7d436e440.data.msg);
    return
  } 
  let info637c7d436e440 = data637c7d436e440.data;
  
  
    this.$urouter.navigateTo(`/pages/grzx/infoSuccess/infoSuccess`);
                }
		}
    };
</script> 
<style lang="scss" scoped>
           .page{
            width: 100vw;
            overflow-x: hidden;
            min-height: calc(100vh - var(--window-bottom));
            background:var(--benbenbgColor0);background-size: 100% auto;
        }
    .realname_flex_0{
        background:var(--benbenbgColor1);width:750rpx;height:88rpx;overflow:hidden;z-index:10;top:0rpx;background-size:100% auto !important;
    }
    .realname_fd0_0_c1_c0{
        font-size:36rpx;font-weight:500;color:#333333;line-height:50rpx;
    }
    .realname_fd0_0_c0_c0{
        font-size:36rpx;color:#333;
    }
    .realname_fd0_0_c0{
        width:120rpx;
    }
    .realname_fd0_0{
        padding:0rpx 32rpx 0rpx 32rpx;
    }
    .realname_flex_1{
        background:#fff;border-radius:16rpx 16rpx 16rpx 16rpx;background-size:100% auto !important;position:relative;width:702rpx;margin:24rpx auto 0rpx auto;padding:0rpx 0rpx 24rpx 0rpx;
    }
    .realname_numberfd1_8_c0{
        width:100%;font-size:24rpx;color:#FFFFFF;line-height:46rpx;font-weight:400;
    }
    .realname_input_fd1_8{
        width:100%;height:140rpx;font-size:28rpx;font-weight:400;color:#333;white-space:pre-wrap;
    }
    .realname_fd1_8{
        background:#F8F9FD;width:650rpx;border-radius:10rpx 10rpx 10rpx 10rpx;padding:10rpx 10rpx 0rpx 16rpx;margin:0rpx auto 0rpx auto;
    }
    .realname_fd1_7{
        background:#fff;padding:32rpx 0rpx 32rpx 0rpx;background-size:100% auto !important;margin:0rpx 24rpx 0rpx 24rpx;
    }
    .realname_fd1_6_c0{
        background:#4781f5;border-radius:44rpx;width:676rpx;line-height:80rpx;font-size:32rpx;color:#fff;height:80rpx;
    }
    .realname_fd1_6{
        position:absolute;margin:0rpx 32rpx 0rpx 32rpx;bottom:-500rpx;
    }
    .realname_fd1_4_c1_c0_image{
        width:265rpx;height:180rpx;border-radius:8rpx;
    }
    .realname_fd1_4_c1_c0_icon{
        top:0rpx;right:0rpx;z-index:10;color:#ff5536;
    }
    .realname_fd1_4{
        border-bottom:1px solid rgba(238, 238, 238, 1);padding:32rpx 0rpx 32rpx 0rpx;margin:0rpx 24rpx 0rpx 24rpx;
    }
    .realname_fd1_2_c1{
        text-align:right;margin:0rpx 0rpx 0rpx auto;font-size:32rpx;color:#333;font-weight:400;
    }
    .realname_fd1_2{
        border-bottom:1px solid #eee;background:#fff;padding:30rpx 0rpx 30rpx 0rpx;background-size:100% auto !important;margin:0rpx 24rpx 0rpx 24rpx;
    }
    .realname_fd1_1_c1{
        text-align:right;margin:0rpx 0rpx 0rpx auto;font-size:32rpx;font-weight:400;color:#333;
    }
    .realname_fd1_1_c0{
        color:#333333;font-size:32rpx;font-weight:400;line-height:40rpx;
    }
    .realname_fd1_1{
        border-bottom:1px solid #eee;background:#fff;padding:32rpx 0rpx 32rpx 0rpx;background-size:100% auto !important;margin:0rpx 24rpx 0rpx 24rpx;
    }
    .realname_fd1_0{
        border-bottom:1px solid #eee;background:var(--benbenbgColor1);color:#333333;font-size:32rpx;font-weight:600;line-height:45rpx;padding:32rpx 32rpx 32rpx 24rpx;background-size:100% auto !important;
    }
    .realname_picker2_0_c2{
        color:rgba(255, 111, 2, 1);
    }
    .realname_picker2_0{
        border-bottom:1px solid #eee;background:#fff;padding:0rpx 32rpx 0rpx 32rpx;line-height:88rpx;border-radius:25rpx 25rpx 0rpx 0rpx;background-size:100% auto !important;
    }
    .realname_flex_3{
        background:var(--benbenbgColor1);width:750rpx;height:140rpx;overflow:hidden;z-index:10;bottom:calc(0rpx + var(--window-bottom));background-size:100% auto;
    }
    .realname_fd3_0{
        background:var(--benbenbgColor2);border-radius:44rpx 44rpx 44rpx 44rpx;width:686rpx;line-height:88rpx;font-size:32rpx;color:var(--benbenFontColor3);height:88rpx;
    }
</style>